package Demo1.Book;

public class Booklist {
    private Book[] books = new Book[10];
    private int usedSize;//记录当前书的数目

    public Booklist() {
        //初始化成员
        this.books[0] = new Book("三国演义","罗贯中","小说",28);
        this.books[1] = new Book("西游记","吴承恩","小说",30);
        this.books[2] = new Book("红楼梦","曹雪芹","小说",35);
        this.usedSize = 3;
    }


    public Book getBooks(int pos) {
        return this.books[pos];
    }
    public void  setBooks(int pos,Book book){
        this.books[pos] = book;
    }
    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
}
